<div class="breadcrumbs breadcrumbs-fixed ace-save-state">
    <ul class="breadcrumb">
        <li>
            <i class="ace-icon fa fa-users home-icon"></i>
            <a href="#">用户管理</a>
        </li>
        <li class="active">用户列表</li>
    </ul>
</div>

<div class="page-content">
    <div class="row">
        <div class="col-xs-12">
            <h4 class="header smaller lighter blue">用户列表</h4>
            <div class="space-6"></div>
            <div class="dataTables_wrapper form-inline no-footer">
                <table id="company-table" class="table table-striped table-bordered table-hover">
                    <thead>
                    <tr>
                        <th class="center">序号</th>
                        <th>open_id</th>
                        <th>用户头像</th>
                        <th>用户昵称</th>
                        <th>微信绑定手机号</th>
                        <th>注册时间</th>
                    </tr>
                    </thead>
                </table>
            </div>
        </div>
    </div>


    <script type="text/javascript">
        var company_table;

        $(function () {

            company_table = $('#company-table').DataTable({
                language: {url: 'ace/json/dataTable_CN.json'},
                autoWidth: false,
                ordering: false,
                searching: false,
                serverSide: true,
                processing: true,
                deferRender: true,
                responsive: true,
                ajax: {
                    url: 'user/getAllList?',
                },
                fnDrawCallback  : function(){
                            　　this.api().column(0, {
                                  search: 'applied',
                                  order: 'applied'
                              }).nodes().each(function(cell, i) {
                                  cell.innerHTML = i + 1;
                              });
                            },
                columns: [
                    {
                        data: null,
                        targets: 0
                    },

                    {
                        data: 'openId',
                        defaultContent: ''
                    },
                    {

                        data:function(row){

                            return "<img src='"+row.imageUrl+"' width='90px' height='90px'/>";
                        }
                    },
                    {
                        data: 'name',
                        defaultContent: ''
                    },
                    {
                        data: 'phone',
                        defaultContent: ''
                    }
                    ,{
                        data: 'createTime',
                        defaultContent: ''
                    }

                ]
            });



        });
    </script>
</div>